#include "delay.h"
#include "tim3.h"
#include "tim4.h"
#include "usart.h"
int main(void)
{
	// 初始化
	USART_Init();
	TIM3_Init();
	TIM4_Init();
	
	// 开启定时器
	TIM4_Start();
	TIM3_Start();

	TIM4_SetDutyCycle(50);

	while (1)
	{
		// 输出当前检测的周期和频率
		printf("T = %.2f ms, f = %.2f Hz\r\n", TIM3_GetPWMCycle(), TIM3_GetPWMFreq());
		Delay_ms(1000);
	}
}

